/*
 * StrategyG - Web System
 * Copyright 2011-2012
 *
 * Autor		: Vanie Torres
 * Fecha Registro	: 30/11/2012 12:22:54 AM
 * Detalle		: Zona
 */

package com.strategy.data.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Vanie Torres
 */
@Entity
@Table(name = "tbl_zona", catalog = "strategydb", schema = "tesis")
@SequenceGenerator(name = "tesis.seq_tbl_zona_cod", sequenceName = "tesis.seq_tbl_zona_cod")
@NamedQueries({
    @NamedQuery(name = "Zona.findAll", query = "SELECT z FROM Zona z")})
public class Zona implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "tesis.seq_tbl_zona_cod")
    @Column(name = "zona_cod")
    private Integer codigo;
    @Column(name = "zona_desc")
    private String desc;
    @Column(name = "zona_perfil_cod")
    private Integer perfilCodigo;
    @Basic(optional = false)
    @Column(name = "zona_fregistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date registroFecha;
    @Column(name = "zona_tipo")
    private Integer tipo;
    @Basic(optional = false)
    @Column(name = "zona_usrregistro")
    private String registroUsr;
    @Basic(optional = false)
    @Column(name = "zona_ipregistro")
    private String registroIp;
    @Basic(optional = false)
    @Column(name = "zona_fauditoria")
    @Temporal(TemporalType.TIMESTAMP)
    private Date auditoriaFecha;
    @Basic(optional = false)
    @Column(name = "zona_usrauditoria")
    private String auditoriaUsr;
    @Basic(optional = false)
    @Column(name = "zona_ipauditoria")
    private String auditoriaIp;

    public Zona() {
    }

    public Zona(Integer zonaCod) {
        this.codigo = zonaCod;
    }

    public Date getAuditoriaFecha() {
        return auditoriaFecha;
    }

    public void setAuditoriaFecha(Date auditoriaFecha) {
        this.auditoriaFecha = auditoriaFecha;
    }

    public String getAuditoriaIp() {
        return auditoriaIp;
    }

    public void setAuditoriaIp(String auditoriaIp) {
        this.auditoriaIp = auditoriaIp;
    }

    public String getAuditoriaUsr() {
        return auditoriaUsr;
    }

    public void setAuditoriaUsr(String auditoriaUsr) {
        this.auditoriaUsr = auditoriaUsr;
    }

    public Integer getCodigo() {
        return codigo;
    }

    public void setCodigo(Integer codigo) {
        this.codigo = codigo;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getPerfilCodigo() {
        return perfilCodigo;
    }

    public void setPerfilCodigo(Integer perfilCodigo) {
        this.perfilCodigo = perfilCodigo;
    }

    public Date getRegistroFecha() {
        return registroFecha;
    }

    public void setRegistroFecha(Date registroFecha) {
        this.registroFecha = registroFecha;
    }

    public String getRegistroIp() {
        return registroIp;
    }

    public void setRegistroIp(String registroIp) {
        this.registroIp = registroIp;
    }

    public String getRegistroUsr() {
        return registroUsr;
    }

    public void setRegistroUsr(String registroUsr) {
        this.registroUsr = registroUsr;
    }

    public Integer getTipo() {
        return tipo;
    }

    public void setTipo(Integer tipo) {
        this.tipo = tipo;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codigo != null ? codigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Zona)) {
            return false;
        }
        Zona other = (Zona) object;
        if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.strategy.data.entity.Zona[zonaCod=" + codigo + "]";
    }

}
